package com.mine.modules.sys.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mine.common.domain.vo.Result;
import com.mine.modules.sys.domain.vo.DepartIdModel;
import com.mine.modules.sys.domain.vo.SysDepartTreeModel;
import com.mine.modules.sys.entity.SysDepart;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 * 组织机构表 服务类
 * </p>
 *
 * @author author
 * @since 2024-10-09
 */
public interface ISysDepartService extends IService<SysDepart> {

    Result<List<SysDepartTreeModel>> queryTreeList(String keywords);

    Result<List<SysDepartTreeModel>> queryDepartTreeSync(String parentId, String ids, String primaryKey);

    Result<?> queryParentIds(String departId, String orgCode);

    Result<SysDepart> add(SysDepart sysDepart, HttpServletRequest request);

    Result<SysDepart> edit(SysDepart sysDepart, HttpServletRequest request);

    Result<?> delete(String id);

    Result<?> deleteBatch(String ids);

    Result<List<DepartIdModel>> queryIdTree();

    SysDepart getDepartById(String parentId);

    IPage<SysDepart> getMaxCodeDepart(Page<SysDepart> page, String parentId);

}
